<template>
	<view class="center">
		<hea-ders title="我的收益">
			<image slot='left' src="@/static/images/arrow_left.png" mode="widthFix" @click="back"></image>
			<picker slot='Lright' mode="date" :value="date" >
				<image  src="@/static/images/s36.png" mode="widthFix" @change="bindDateChange">	</image>
			</picker>
		
		</hea-ders>
		<view class="titlebulk">
			<view class="money" @tap='moneylist("0")'>
				<text :class="corrent == 0? 'sizes':''">123</text>
				<text :class=" corrent == 0? 'sizes': '' ">昨日收益（元）</text>
			</view>
			<view class="money" @tap='moneylist("1")'>
				<text  :class="corrent ==1? 'sizes':''" >123</text>
				<text :class=" corrent == 1? 'sizes': '' ">今日收益（元）</text>
			</view>
			<view class="money" @tap='moneylist("2")'>
				<text :class=" corrent ==2? 'sizes':''">123</text>
				<text :class=" corrent == 2? 'sizes': '' ">总收益（元）</text>
			</view>
		</view>
		
	<view class=" kuan">
		<view class="info" v-if="corrent ==0">
			<view class="topl">
				<view class="info_namDtel">
					<text>李小明</text>
					<text style="color: #FF2929;">收益+100元</text>
				</view>
				<view class="info_namDtel">	
					<text style="color: #9E9E9E;">购买版本：WMK-1.0</text>
					<text style="color: #9E9E9E;">收益日期：2021-01-19</text>
				</view>	
			</view>
			<view class="topl">
				<view class="info_namDtel">
					<text>李小明</text>
					<text style="color: #FF2929;">收益+100元</text>
				</view>
				<view class="info_namDtel">	
					<text style="color: #9E9E9E;">购买版本：WMK-1.0</text>
					<text style="color: #9E9E9E;">收益日期：2021-01-19</text>
				</view>	
			</view>
			<view class="topl">
				<view class="info_namDtel">
					<text>李小明</text>
					<text style="color: #FF2929;">收益+100元</text>
				</view>
				<view class="info_namDtel">	
					<text style="color: #9E9E9E;">购买版本：WMK-1.0</text>
					<text style="color: #9E9E9E;">收益日期：2021-01-19</text>
				</view>	
			</view>
			<view class="topl">
				<view class="info_namDtel">
					<text>李小明</text>
					<text style="color: #FF2929;">收益+100元</text>
				</view>
				<view class="info_namDtel">	
					<text style="color: #9E9E9E;">购买版本：WMK-1.0</text>
					<text style="color: #9E9E9E;">收益日期：2021-01-19</text>
				</view>	
			</view>
			<view class="topl">
				<view class="info_namDtel">
					<text>李小明</text>
					<text style="color: #FF2929;">收益+100元</text>
				</view>
				<view class="info_namDtel">	
					<text style="color: #9E9E9E;">购买版本：WMK-1.0</text>
					<text style="color: #9E9E9E;">收益日期：2021-01-19</text>
				</view>	
			</view>
			<view class="topl">
				<view class="info_namDtel">
					<text>李小明</text>
					<text style="color: #FF2929;">收益+100元</text>
				</view>
				<view class="info_namDtel">	
					<text style="color: #9E9E9E;">购买版本：WMK-1.0</text>
					<text style="color: #9E9E9E;">收益日期：2021-01-19</text>
				</view>	
			</view>
			<view class="topl">
				<view class="info_namDtel">
					<text>李小明</text>
					<text style="color: #FF2929;">收益+100元</text>
				</view>
				<view class="info_namDtel">	
					<text style="color: #9E9E9E;">购买版本：WMK-1.0</text>
					<text style="color: #9E9E9E;">收益日期：2021-01-19</text>
				</view>	
			</view>
			<view class="topl">
				<view class="info_namDtel">
					<text>李小明</text>
					<text style="color: #FF2929;">收益+100元</text>
				</view>
				<view class="info_namDtel">	
					<text style="color: #9E9E9E;">购买版本：WMK-1.0</text>
					<text style="color: #9E9E9E;">收益日期：2021-01-19</text>
				</view>	
			</view>
			<view class="topl">
				<view class="info_namDtel">
					<text>李小明</text>
					<text style="color: #FF2929;">收益+100元</text>
				</view>
				<view class="info_namDtel">	
					<text style="color: #9E9E9E;">购买版本：WMK-1.0</text>
					<text style="color: #9E9E9E;">收益日期：2021-01-19</text>
				</view>	
			</view>
			<view class="topl">
				<view class="info_namDtel">
					<text>李小明</text>
					<text style="color: #FF2929;">收益+100元</text>
				</view>
				<view class="info_namDtel">	
					<text style="color: #9E9E9E;">购买版本：WMK-1.0</text>
					<text style="color: #9E9E9E;">收益日期：2021-01-19</text>
				</view>	
			</view>
			<view class="topl">
				<view class="info_namDtel">
					<text>李小明</text>
					<text style="color: #FF2929;">收益+100元</text>
				</view>
				<view class="info_namDtel">	
					<text style="color: #9E9E9E;">购买版本：WMK-1.0</text>
					<text style="color: #9E9E9E;">收益日期：2021-01-19</text>
				</view>	
			</view>
			
		</view>
		
		
		<view class="info" v-if="corrent ==1">
			<view class="topl">
				<view class="info_namDtel">
					<text>李小</text>
					<text style="color: #FF2929;">收益+100元</text>
				</view>
				<view class="info_namDtel">	
					<text style="color: #9E9E9E;">购买版本：WMK-1.0</text>
					<text style="color: #9E9E9E;">收益日期：2021-01-19</text>
				</view>	
			</view>
			<view class="topl">
				<view class="info_namDtel">
					<text>李小</text>
					<text style="color: #FF2929;">收益+100元</text>
				</view>
				<view class="info_namDtel">	
					<text style="color: #9E9E9E;">购买版本：WMK-1.0</text>
					<text style="color: #9E9E9E;">收益日期：2021-01-19</text>
				</view>	
			</view>
		</view>
		
		
		
		<view class="info" v-if="corrent ==2">
			<view class="topl">
				<view class="info_namDtel">
					<text>李明</text>
					<text style="color: #FF2929;">收益+100元</text>
				</view>
				<view class="info_namDtel">	
					<text style="color: #9E9E9E;">购买版本：WMK-1.0</text>
					<text style="color: #9E9E9E;">收益日期：2021-01-19</text>
				</view>	
			</view>
			<view class="topl">
				<view class="info_namDtel">
					<text>李明</text>
					<text style="color: #FF2929;">收益+100元</text>
				</view>
				<view class="info_namDtel">	
					<text style="color: #9E9E9E;">购买版本：WMK-1.0</text>
					<text style="color: #9E9E9E;">收益日期：2021-01-19</text>
				</view>	
			</view>
		</view>

	</view>
		
		<button type="primary" @tap='deposit'>提现</button>
	</view>
</template>

<script>
	import heaDers from '@/pages/header/header.vue'
	export default {
		components:{
			heaDers
		},
		
		data() {
			const currentDate = this.getDate({
				format: true
			})
			return {
				corrent:0,
				date: currentDate,
			}
		},
		methods: {
			moneylist(idnex){
				this.corrent = idnex
			},
			back(){
				uni.navigateBack({
					delta:1
				})
			},
			bindDateChange: function(e) {
				this.date = e.target.value
			},
			bindTimeChange: function(e) {
				this.time = e.target.value
			},
			getDate(type) {
				const date = new Date();
				let year = date.getFullYear();
				let month = date.getMonth() + 1;
				let day = date.getDate();
			
				if (type === 'start') {
					year = year - 60;
				} else if (type === 'end') {
					year = year + 2;
				}
				month = month > 9 ? month : '0' + month;;
				day = day > 9 ? day : '0' + day;
				return `${year}-${month}-${day}`;
			},
			deposit(){
				uni.navigateTo({
					url:'../withdrawals/withdrawals'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.center {
		width: 100vw;
		height: 100vh;
		background-color: #F5F5F5;
		box-sizing: border-box;
		.title {
			width: 100%;
			height: 88rpx;
			padding: 0 30rpx;
			box-sizing: border-box;
			background-color: rgba(36, 153, 246, 1);
			display: flex;
			justify-content: space-between;
			align-items: center;
		
			image {
			
				width: 22rpx;
			}
		
			text {
				font-size: 36rpx;
				color: #fff;
				font-weight: 400;
				font-family: PingFang SC;
			}
		
			.ima {
				image {
					width: 40rpx;
					margin-left: 5rpx;
				}
			}
		}
		.titlebulk {
			width: 100%;
			box-sizing: border-box;
			margin: 10rpx 0;
			display: flex;
			.money {
				flex: 1;
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;
				height: 138rpx;
				margin-right: 10rpx;
				background: #fff;
				.sizes{
					color: rgba(35,153,246,1);
					font-size:20rpx;
				}
				.size{
					margin: 10rpx;
					font-size:20rpx;
					font-family:PingFang SC;
					font-weight:500;
					line-height:28rpx;
					color: rgba(35,153,246,1);
					opacity:1;
				}
				text{
					margin: 10rpx;
					font-size:20rpx;
					font-family:PingFang SC;
					font-weight:500;
					line-height:28rpx;
					color:rgba(97,97,97,1);
					opacity:1;
				}
			}
			.money:last-child{
				margin-right: 0;
			}
		}
		.kuan {
		margin-top: 10rpx;
		width: 100%;
		height: 74.66%;
		box-sizing: border-box;
		overflow-y: scroll;
		background-color: #F5F5F5;
		padding-bottom: 20rpx;
			.info{
				width: 100%;
				box-sizing: border-box;
			.topl{
				padding: 10rpx 30rpx;
				box-sizing: border-box;
				background: #fff;
				margin-top: 10rpx;
				width: 100%;
				box-sizing: border-box;
				.info_namDtel{
					display: flex;
					justify-content: space-between;
					margin:10rpx;
					text{
						font-size:24rpx;
						font-family:PingFang SC;
						font-weight:500;
						line-height:33rpx;
						color:rgba(66,66,66,1);
						opacity:1;
					}
				}
			}
			.topl:frist-child {
					margin-top: 0rpx;
			}
				
			}
		}
		
		button{
			width: 100%;
			position: fixed;
			left: 0;
			bottom: 0;
			box-sizing: border-box;
			border-radius: 0;
		}
	}
</style>
